from enum import Enum

from qfluentwidgets import StyleSheetBase, Theme, isDarkTheme


class StyleSheet(StyleSheetBase, Enum):
    TitleBar = 'title_bar'
    NavigationBar = 'navigation_bar'
    Card = 'card'
    TextWidget = 'text_widget'
    LeaderboardInterface = 'leaderboard_interface'
    MainInterface = 'main_interface'

    def path(self, theme=Theme.AUTO):
        theme = 'dark' if isDarkTheme() else 'light'
        p = 'F:/PythonObject/music-library'
        file = f'{p}/resource/qss/{theme}/{self.value}.css'
        return file
